//
//  ClassTableViewCell.m
//  AStage_shougongke
//
//  Created by 赵磊 on 16/1/25.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ClassTableViewCell.h"

@implementation ClassTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imgView = [[UIImageView alloc] init];
        _imgView.layer.cornerRadius = 3;
        _imgView.clipsToBounds = YES;
        _imgView.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_imgView];
        self.freeView = [[UIImageView alloc] init];
        [_imgView addSubview:_freeView];
        self.bgView = [[UIView alloc] init];
        _bgView.backgroundColor = [UIColor blackColor];
        _bgView.alpha = 0.1;
        [_imgView addSubview:_bgView];
        self.titleLabel = [[UILabel alloc] init];
//        _titleLabel.backgroundColor = [UIColor grayColor];
        _titleLabel.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_titleLabel];
        [_imgView release];
        [_bgView release];
        [_titleLabel release];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    _imgView.frame = CGRectMake(10, 0, self.contentView.frame.size.width - 20, self.contentView.frame.size.width / 2 - 10);
    _bgView.frame = CGRectMake(0, _imgView.frame.size.height - 50, _imgView.frame.size.width, 50);
    _titleLabel.frame = CGRectMake(20, self.contentView.frame.size.width / 2 - 50, self.contentView.frame.size.width - 20, 30);
    _freeView.frame = CGRectMake(0, 0, 40, 40);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
